<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
 
  <ui:composition template="/pages/templates/commonLayoutCli.xhtml">

	
	<ui:define name="content">

	<h:form>
		
		<center>
		
			<p:messages id="messagesLogin" showDetail="false" autoUpdate="true" closable="true" style="width:70%;align:center;" globalOnly="true"/>
			
			<p:panel id="panelVisualizarProfissionais" style="width:70%;align:center;valign:middle;">
				<h:panelGrid columns="2"  cellpadding="5" >
				
				<p:outputLabel value="Profissionais:" ></p:outputLabel>
				<p:selectOneMenu id="select" value="#{beanVisualizarProfissionais.codigoProfissional}">
    				<p:ajax event="change" update="panelVisualizarProfissionais" listener="#{beanVisualizarProfissionais.carregarDadosProfissionais()}" />
    				<f:selectItem itemLabel="Selecione" itemValue="" noSelectionOption="true" />
    				<f:selectItems  value="#{beanVisualizarProfissionais.profissionais}" var="profissional" itemLabel="#{profissional.nome}" itemValue="#{profissional.codigo}"/>
				</p:selectOneMenu>
				</h:panelGrid>
				
				<h:panelGrid columns="2" cellpadding ="5" style="width:60%;align:center;valign:middle;">
				
				<p:outputLabel value="Nome:" ></p:outputLabel>
				<p:inputText id="nome" size="50" value="#{beanVisualizarProfissionais.nome}" readonly="true"></p:inputText>
				
				<p:outputLabel value="CPF:" ></p:outputLabel>
				<p:inputMask id="cpf" size="12" mask="999.999.999-99" value="#{beanVisualizarProfissionais.cpf}" readonly="true"></p:inputMask>
				
				<p:outputLabel value="Rua:" ></p:outputLabel>
				<p:inputText id="rua" size="50" value="#{beanVisualizarProfissionais.rua}" ></p:inputText>
				
				<p:outputLabel value="Número:" ></p:outputLabel>
				<p:inputText id="numero" size="8" value="#{beanVisualizarProfissionais.numero}"></p:inputText>
				
				<p:outputLabel value="Bairro:" ></p:outputLabel>
				<p:inputText id="bairro" size="50" value="#{beanVisualizarProfissionais.bairro}"></p:inputText>
				
				<p:outputLabel value="Cidade:" ></p:outputLabel>
				<p:inputText id="cidade" size="50" value="#{beanVisualizarProfissionais.cidade}"></p:inputText>	
				
				<p:outputLabel value="Estado:" ></p:outputLabel>
				<p:inputText id="estado" size="50" value="#{beanVisualizarProfissionais.estado}"></p:inputText>
				
				<p:outputLabel value="Telefone 1:" />
	        		<p:inputMask id="telefone1" size="12" value="#{beanVisualizarProfissionais.telefone1}" mask="(99) 9999-9999?9"></p:inputMask>
				
				<p:outputLabel value="Telefone 2:" /> 
	        		<p:inputMask id="telefone2" size="12" value="#{beanVisualizarProfissionais.telefone2}" mask="(99) 9999-9999?9" ></p:inputMask>
				</h:panelGrid>
	
				<!-- <h:panelGrid columns="3" cellpadding ="5" style="width:60%;align:center;valign:middle;">
					<p:outputLabel value="Telefone 1:" /> mudança joeu
	        		<p:inputMask id="telefone1" size="12" value="#{beanVisualizarProfissionais.telefone1}" mask="(99) 9999-9999?9"></p:inputMask>
					
					<p:outputLabel value="Telefone 2:" /> mudança joeu
	        		<p:inputMask id="telefone2" size="12" value="#{beanVisualizarProfissionais.telefone2}" mask="(99) 9999-9999?9" ></p:inputMask>
				</h:panelGrid> -->
				

				<!-- <p:outputLabel value="Área de atuação:" ></p:outputLabel>
				<ui:repeat var="area" value="#{beanVisualizarProfissionais.areasAtuacao}">
					<p:inputText id="clinica" size="50" value="area"></p:inputText>
				</ui:repeat> -->
				
				<br>
				</br>
				
				<center>
					<h:panelGrid columns="2">
						<p:commandButton value="Salvar Alterações" action="#{beanVisualizarProfissionais.salvarAlteracoes()}" update="panelVisualizarProfissionais"/>
						<p:commandButton value="Remover profissional" action="#{beanVisualizarProfissionais.removerProfissional()}" update="panelVisualizarProfissionais"/>
					</h:panelGrid>			
				</center>

			</p:panel>
		</center>
	
	</h:form>
</ui:define>

</ui:composition>

</html>